<template>
  <div class="search-container">
    <el-button class="inline-input"
               @click="StartSearchDialog">
      <img src="@/assets/img/svg/search.svg" />
      搜索
    </el-button>
    <SearchDialog :ShowSearchDialogVisible="ShowSearchDialogVisible"
                  @closeSearchDialog="closeSearchDialog" />
  </div>
</template>

<script>
import SearchDialog from "@/components/Search/SearchDialog.vue"
export default {
  name: "SearchBar",
  props: {

  },
  components: {
    SearchDialog
  },
  data () {
    return {
      ShowSearchDialogVisible: false
    };
  },
  computed: {

  },
  watch: {

  },
  created () {

  },
  mounted () {
  },
  methods: {
    // 打开搜索对话框
    StartSearchDialog () {
      // 打开对话框
      this.ShowSearchDialogVisible = true
    },
    closeSearchDialog () {
      this.ShowSearchDialogVisible = false
    }
  },
};
</script>

<style scoped>
.search-container {
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: flex-end;
}
.inline-input {
  width: 90px;
  float: right;
  border: 0px;
  height: 0.6rem;
  border-radius: 16px;
  color: #76797b;
  margin: auto 0;
  background-color: #f4f5f5;
  /* line-height: 0.08rem; */
  padding: 0px;
}
.search {
  border-radius: 16px 16px 0 0;
}
@media (max-width: 428px) {
  .search-container {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: flex-start;
  }
}
</style>
